package designPattern.creation5.AbstractFactory.A2;

import designPattern.creation5.AbstractFactory.A2.factory.Factory;
import designPattern.creation5.AbstractFactory.A2.factory.Page;

public class Main {
    public static void main(String[] args) {
//        if (args.length != 1) {
//            System.out.println("Usage: java Main class.name.of.ConcreteFactory");
//            System.out.println("Example 1: java Main listfactory.ListFactory");
//            System.out.println("Example 2: java Main tablefactory.TableFactory");
//            System.exit(0);
//        }



//        String classname=args[0];

        String classname="DesigningPattenPIC.creation.AbstractFactory.A2.listfactory.ListFactory";
//        String classname="DesigningPattenPIC.creation.AbstractFactory.A2.tablefactory.TableFactory";

        Factory factory = Factory.getFactory(classname);
        Page page = factory.createYahooPage();
        page.output();
    }
}
